Repository navigation
fix(projects): 新建项目和管理员认领体验项目时补上 Owner - #4
Open
Robert0622 wants to merge 2 commits into
Open
Robert0622 wants to merge 2 commits into
Robert0622 wants to merge 2 commits into
Conversation
The first account is a platform admin, and project create skipped the owner default for every admin. The seeded welcome project also stayed ownerless, so clarification and GitHub sync failed until someone picked an owner by hand. Co-authored-by: Cursor <[email protected]>
Owner
Author
|
本提交的 13 项独立检查已通过。第 3 次运行中,GitHub 仍未能为 macOS 分配托管 runner,测试步骤数为 0。依赖该任务的 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2
用户遇到的问题
在 v0.4.0 首次注册的账号就是管理员。管理员从界面创建项目并省略 Owner,或从旧版升级后登录原先没有 Owner 的体验项目,项目都可能缺少负责人。需求也没有责任人时,澄清流程找不到可以使用的个人凭据。访问私有 GitHub 仓库还取决于账号的授权范围,HTTP 403 本身不足以判断缺少 Owner。
变更
新项目未指定 Owner 时使用创建者。首位注册管理员可以认领未归档、尚无 Owner 的体验项目,旧实例的管理员也可以在登录时认领。认领会把已有成员提升为维护者,并补齐尚未分配的需求。普通账号注册只加入可用的体验项目。管理员随后登录时,项目中已移除的成员关系得到保留。
复核原 PR 时通过真实注册、密码登录接口发现三处遗漏:认领后仍是普通成员、已移除的管理员再次登录被加回、归档后注册仍会添加成员。修订使用同一笔数据库事务锁定项目并单独更新受影响记录,同时注册的账号各自保留成员关系。
验证
组合复测
将四个修复的实际提交应用到 v0.4.0 后,管理员再次创建未指定 Owner 的项目。项目记录显示创建者是 Owner,真实模型通过该 Owner 的凭据完成澄清,独立算出 450 分加 325 分为 775 分。
当前提交的 CI
提交
c46b1b7e65c9的 15 项 GitHub 检查全部通过,含 macOS。 查看检查记录